Creating Your First Macromedia Central Application
Table of Contents
Structure and Terms Before Getting Started
Your Central product can include an application that appears in the main shell plus smaller Flash applications, called pods, that appear in the Console. Additionally, if you want to run background tasks while your application is dormant, you need an agent. Each piece of your product (application, pod, and agent) uses a separate SWF, which your users install in one click using the installer.swf file posted on your website or through Central's built-in Application Finder. In either case, you need a product.xml file, which specifies which files get installed as well as other details, such as where help files are located, the cost of your application, and the duration of any trial period, where appropriate.
Dealing with all these files really isn't so bad. For example, you can use the generic installer.swf that ships with the Central SDK as is. It automatically reads and parses product.xml. Here are the files you'll build in this tutorial (see Figure 1):
- product.xml: Includes details needed for Central to install your files
- installer.swf: Generic installer that parses data in product.xml
- app.swf, app.fla, app.as: SWF and source files (.fla and .as) for the main shell application
- pod.swf, pod.fla, pod.as: SWF and source files for the pod application
- agent.swf, agent.fla, agent.as: SWF and source files for the agent application
- interface.as: Provides a list of shared methods (through LCService) for all three applications
Note: For more information about LCService, read Ethan Malasky's article, "Understanding and Using the LCService Library."
Figure 1. Files necessary for creating your first Macromedia Central application
You must install Central applications from an actual web server. This way, the Flash Player security restrictions will be based on the server from which you installed the Central application. For testing, you can use localhost (http://127.0.0.1). Alternatively, upload files to a website you control and install the application from there. In addition, be sure to use the Macromedia Central Product ID Registration generator so you get a unique number that ensures all your products (even tests) install properly. When you are ready to publish your application and intend to sell it, look into the requirements so you can get it listed in the Application Finder. This way your potential customers will have an easy way of finding your application. Don't worry about that for this tutorial, however, because you're just making a simple application.